export default {
  get (key) {
    let value = localStorage.getItem(key)
    if (!value) return null
    try {
      value = JSON.parse(value)
      // eslint-disable-next-line
        } catch (_) {}
    return value
  },

  set (key, value) {
    localStorage.setItem(key, JSON.stringify(value))
  }
}
